A software defined networking (SDN) network includes a controller, a switch, and a host. Multiple hosts may all join one multicast group, and one host may join multiple multicast groups at the same time. A host joining a multicast group may be referred to as a multicast group member. When multicast communication is implemented, the switch is responsible for forwarding data streams between the controller and multicast group members, and the controller maintains a multicast group member that joins and leaves the multicast group, to control forwarding paths of data streams.
Currently, a process of maintaining a multicast group member includes the following. The controller sends a general query message to the switch, and the switch receives the general query message, and sends the general query message to a multicast group member included in the multicast group. When receiving the general query message, the multicast group member generates a query response message for each multicast group that the multicast group member joins, and sends the generated query response message to the switch, and the switch sends the query response message to the controller. When receiving the query response message, the controller processes the query response message, to determine whether the multicast group member changes, so as to maintain the multicast group member in the multicast group.
The controller periodically sends a general query message to each multicast group member included in a multicast group, and when the multicast group includes a relatively large quantity of multicast group members, the controller periodically receives a relatively large quantity of query response messages. Therefore, load of the controller is increased, and processing efficiency of the controller is reduced.